﻿@model Web.Models.RegistryData

@using (Html.BeginForm())
{
    if (ViewBag.ActionResult != null)
    {
         <div class="ResultOk">@ViewBag.ActionResult</div>
    }
    
    <div class="ResultError">@Html.ValidationSummary()</div>
         
    <div class="half">

        <div class="form">

            <div class="formtitle">Rejestracja nowego konta:</div>
            
            <div class="input">
			    <div class="inputtext">Imię:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonFirstName)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonFirstName)
                    </div>
			    </div>
		    </div>

            <div class="input">
			    <div class="inputtext">Nazwisko:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonLastName)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonLastName)
                    </div>
			    </div>
		    </div>

		    <div class="input">
			    <div class="inputtext">Miasto:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonCity)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonCity)
                    </div>
			    </div>
		    </div>

		    <div class="input">
			    <div class="inputtext">Adres:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonAdress)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonAdress)
                    </div>
			    </div>
		    </div>

            <div class="input">
			    <div class="inputtext">Kod pocztowy:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonZipCode)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonZipCode)
                    </div>
			    </div>
		    </div>

            <div class="input">
			    <div class="inputtext">Data urodzenia:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonBirthDate, new { @id = "date1" })
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonBirthDate)
                    </div>
			    </div>
		    </div>

            <div class="input nobottomborder">
			    <div class="inputtext">Numer pesel:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.Person.PersonNationalIdentifier)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Person.PersonNationalIdentifier)
                    </div>
			    </div>
		    </div>

            <div class="buttons">
			    <input class="orangebutton" type="submit" value="Załóż konto" />
			    <input class="greybutton" type="reset" value="Wyczyść formularz" />
		    </div>

        </div>

    </div>
    
    <div class="half">

        <div class="form">

            <div class="formtitle">Dane użytkownika</div>
            
            <div class="input">
			    <div class="inputtext">Nazwa użytkownika:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.User.UserDisplayName)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.User.UserDisplayName)
                    </div>
			    </div>
		    </div>

		    <div class="input">
			    <div class="inputtext">Hasło:</div>
			    <div class="inputcontent">
				    @Html.PasswordFor(m => m.Password)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.Password)
                    </div>
			    </div>
		    </div>

		    <div class="input nobottomborder">
			    <div class="inputtext">Adres Email:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(m => m.User.UserEmail)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(m => m.User.UserEmail)
                    </div>
			    </div>
		    </div>

        </div>
    
    </div>
}
